home *** CD-ROM | disk | FTP | other *** search
- #ifndef _BTREE_H_
- #define _BTREE_H_
- /*
- * $RCSfile: btree.h,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:55:19 $
- */
- #ifndef __BTREE_H__
- #define __BTREE_H__
-
- /* BEGIN visible to user */
-
- typedef struct {
- BOOL valid;
- PID rootPID;
- PID page;
- TWO slotNum;
- TWO index;
- } BT_CURSOR;
-
-
- typedef struct {
- IID ndx; /* index id */
- char b2[SM_MAXKEYLEN]; /* bound2 (must be aligned) */
- int b2len; /* length of bound2 */
- int groupIndex;
- SMCOND cond2;
- BOOL eof; /* TRUE if end of file reached */
- union {
- BT_CURSOR btCursor;
- } opaque;
- } SMCURSOR;
-
-
- typedef struct {
- TWO length; /* length of the key */
- void* valuePtr; /* pointer to value of the key */
- } KEY;
-
- /* END visible to user */
-
- #define SMNDXLOADDESCMAGIC 0x42891393
- typedef struct {
- long magic;
- TID tid;
- VOLID volid;
- FID tmpFid; /* file to store temporary results */
- int groupIndex;
- GROUPLINK* ndxDescLink;
- IID iid;
- int runSize; /* size of each slotted runs */
- int offset; /* index into buffer */
- OID* runList; /* oids of the first rec of each run */
- int runMax; /* size of runList */
- int runCount; /* number of valid runs in runList */
- int recCount; /* number of records for this run */
- int totalRec; /* total number of records */
- int maxKeyLen; /* maximum length of all keys inserted */
- int numPages;
- KEY* keys;
- INDEXDESC ndesc;
- char* buffer; /* malloc space to sort runs */
- } SMNDXLOADDESC;
-
-
- typedef struct {
- int runSize;
- int elSize;
- int offset;
- int recCnt;
- char* buffer;
- } SMBUFINSERTDESC;
-
- extern SMBUFINSERTDESC bufInsTbl[];
-
- #endif /* __BTREE_H__ */
- #endif /* _BTREE_H_ */
-